import { DomEditor } from "@wangeditor/editor";
// 使用默认导出，移除类型注解和泛型
export default function (editor) {
    const { isInline, isVoid } = editor;
    const newEditor = editor;
    // 直接使用函数返回值覆盖原属性
    newEditor.isInline = function (elem) {
        const type = DomEditor.getNodeType(elem);
        if (type === "ssml-mark") return true;
        return isInline(elem);
    };

    newEditor.isVoid = function (elem) {
        const type = DomEditor.getNodeType(elem);
        if (type === "ssml-mark") return false;
        return isVoid(elem);
    };

    return editor;
}
